package com.qfedu.knowledge.strategy;

import com.qfedu.knowledge.entity.vo.QuestionInfoVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.elasticsearch.search.fetch.subphase.highlight.HighlightField;

/**
 * @ClassName StrategyContext
 * @Author ykx
 * @Date 2024/5/23 17:09
 * @Version 1.0
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class StrategyContext {
    private IHighLightStrategy iHighLightStrategy;

    public void contextMethod(QuestionInfoVO questionInfoVO, HighlightField highlightField) {
        iHighLightStrategy.setHighLight(questionInfoVO, highlightField);
    }
}
